package com.xian.wsim.repository;

import com.xian.wsim.entity.MessageInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

@Repository
public interface MessageRepository extends JpaRepository<MessageInfo, Long> {
    List<MessageInfo> findBySenderIdAndReceiverIdAndSendTimeBetweenOrSenderIdAndReceiverIdAndSendTimeBetween(
            Long senderId1, Long receiverId1, LocalDateTime startTime1, LocalDateTime endTime1,
            Long senderId2, Long receiverId2, LocalDateTime startTime2, LocalDateTime endTime2);
}